This invention relates generally to database applications and in particular to database applications that use object relational mapping.
Applications typically store data in databases. For example e-commerce applications store information describing products, orders, transactions, and so on in databases. Data is often stored in databases as tables or relations. A relational model describes the representation of the data stored in the database. Applications typically use an object representation of entities, for example, products, orders, and so on. The object representation is manipulated using instructions provided using a programming language. The object representation of the data model is mapped to a relational representation of the data model to allow transformation between the two representations.
A relational model is typically modified less often compared to the object model. Modification of the relational model corresponds to modification of a database schema. A database may store large amount of data and modifying the database schema may require reorganizing existing data. This may require movement of large amount of data stored on a persistent storage. As a result, modifying the relational model may consume large amount of resources and may slow down the database as well as applications using the database. As a result, database administrators often do not allow modifications to database schema used by an application.
In contrast, the object representation of the data model changes more frequently. For example, the object model may be modified as developers make modifications to the applications, add new features, fix defects, and so on. Conventional object relational mapping techniques require the relational model to be modified to match any changes to the object model. As a result, the database system may have to be upgraded to match the modifications to the object model, thereby disrupting the applications using the databases. Alternatively, the developers may be required to limit the amount of modifications they make to the object model, for example, to major releases of software. As a result, conventional techniques are inadequate to handle the changes required in a fast paced development environment.